package com.tanhua.model.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class UserConclusion implements Serializable {
    private Integer id;//用户id换类型
    @TableField("user_id")
    private Long userId;//用户id
    private String avatar;
    //鉴定结果
    private String conclusion;
    //当前等级
    private Integer level=1;
    //创建时间
    private LocalDateTime created;
    public static UserConclusion init(UserInfo userInfo){
        UserConclusion userConclusion = new UserConclusion();
        userConclusion.setUserId(userInfo.getId());
        userConclusion.setAvatar(userInfo.getAvatar());
        // TODO: 2022/1/9 因为用户id现在都比较小所以转换没有问题,如果后期id比较大则不大合适
        userConclusion.setId(Integer.valueOf(userInfo.getId().toString()));
        return userConclusion;
    }
}
